package com.link.base.base.common.dao.mybatis.mapper;
/**
 * Copyright  hande Company. All Rights Reserved.
 *
 * @author unknwon
 * @date: 2018/11/9 11:31
 * @version 1.0
 */

import com.link.base.base.common.model.Announce;
import com.link.base.base.common.model.AttachmentVer;
import com.link.core.basic.dao.mapper.BasicMapper;

import java.util.List;

/**
 * Copyright  hande Company. All Rights Reserved.
 *
 * @author unknwon
 * @date: 2018/11/9 11:05
 * @version 1.0
 */

public interface AttachmentVerMapper extends BasicMapper<AttachmentVer> {

    /**
     * 查询资源库列表
     * @param record
     * @return
     * @throws Exception
     */
    public List<AttachmentVer> queryAttachmentLibraryListPage(AttachmentVer record) throws Exception;

    /**
     * 根据公告id删除附件表
     *
     * @param record
     * @throws Exception
     */
    public void deleteAttachmentByAnnounceId(Announce record) throws Exception;

    /**
     * 根据公告Id查询公告对应附件的列表
     *
     * @param record
     * @return
     * @throws Exception
     */
    public List<AttachmentVer> queryAttachmentListByAnnounceId(Announce record) throws Exception;

    /**
     * 根据附件Id查询附件隶属的公告信息
     *
     * @param record
     * @return
     * @throws Exception
     */
    public Announce queryAnnouceByAttachmentId(AttachmentVer record) throws Exception;

    /***
     * 通过headID删除附件
     * @param attachmentVer
     * @throws Exception
     */
    public void deleteByHeadId(AttachmentVer attachmentVer) throws Exception;

    /**
     * 根据id查询附件
     * @param attachmentVer
     * @return
     * @throws Exception
     */
    public List<AttachmentVer> queryAttachmentByHeadId(AttachmentVer attachmentVer) throws Exception;

    /**
     * 查询音频附件
     * @param headId
     * @return
     * @throws Exception
     */
    public AttachmentVer queryVoiceAttachmentByHeadId(Long headId) throws Exception;

    /**
     * 根据Id更新头Id信息
     * @param attachmentVer
     * @throws Exception
     */
    public void attachmentHeadIdUpdate(AttachmentVer attachmentVer) throws Exception;

    /**
     * 根据filtersRaw查询附件
     *
     * @author LiYang
     * @date 20191209
     */
    public List<AttachmentVer> queryByFilterPage(AttachmentVer attachmentVer) throws Exception;

    /**
     * 无登录情况下新增附件信息
     *
     * @author 路江
     * @date 2019-12-24
     * @param entity 附件对象
     * @throws Exception 异常信息
     */
    public void attachmentInsertByInterface(AttachmentVer entity) throws Exception;

    /**
     * 根据附件头查询拜访任务附件列表
     *
     * @author 刘启鑫
     * @date 2020/9/14 14:38
     */
    List<AttachmentVer> queryTaskAttachmentByHeadId(AttachmentVer attachmentVer) throws Exception;
}
